package IO;

import java.io.File;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-06-21
 * Time: 15:47
 */
public class IODemo4 {
    public static void main(String[] args) {
        File file = new File("test-dir");
        //罗列目录下的内容
        String[] result1 = file.list();
        System.out.println(Arrays.toString(result1));
        File[] result2 = file.listFiles();
        System.out.println(Arrays.toString(result2));
    }
}
